package com.ianmoone.JZOF;

import java.util.Scanner;

public class ZHTest2 {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String string = in.nextLine();
		String[] split = string.split(" ");
		int min = Integer.MAX_VALUE; 
		int money = Integer.MIN_VALUE;
		for (int i = 0; i < split.length; i++) {
			int n = Integer.valueOf(split[i]);
			int num = n - min;
			money = money > num ? money : num;
			min = min < n ? min : n;
		}
		System.out.println(money);
	}
}
